@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-10 col-md-offset-1">

                @if(isset($action))
                    {{--导航--}}
                    <ul class="nav nav-tabs nav-justified">
                        <li role="presentation" @if($action == 'show') class="active" @endif><a href="{{url('resource/yy_invite/show')}}">待邀约资源</a></li>

                        <li class="active" role="presentation" class="dropdown">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
                                再约 <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu">
                                <li role="presentation" @if($action == 'again') class="active" @endif><a href="{{url('resource/yy_invite/again')}}">全部再约</a></li>
                                <li role="presentation" @if($action == 'againToday') class="active" @endif><a href="{{url('resource/yy_invite/againToday')}}">今日再约</a></li>
                                <li role="presentation" @if($action == 'againOuttime') class="active" @endif><a href="{{url('resource/yy_invite/againOuttime')}}">过期</a></li>
                            </ul>
                        </li>

                        <li role="presentation" @if($action == 'done') class="active" @endif><a href="{{url('resource/yy_invite/done')}}">已完成</a></li>
                        <li role="presentation" @if($action == 'nophone') class="active" @endif><a href="{{url('resource/yy_invite/nophone')}}">无电话</a></li>
                        <li role="presentation" @if($action == 'outtime') class="active" @endif><a href="{{url('resource/yy_invite/outtime')}}">过期资源</a></li>

                    </ul>
                @endif

                <div class="panel panel-default">
                    <div class="panel-heading">{{$type}}</div>
                    @if (count($errors) > 0)
                        <div class="alert alert-danger">
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif
                    @if(session('message')!=null)
                        <div class="alert alert-success">
                            <ul>
                                <li>{{ session('message') }}</li>
                            </ul>
                        </div>
                    @endif
                    <table class="table table-hover">
                        <tr>
                            <td class="success">资源id</td>
                            <td class="success">姓名</td>
                            <td class="success">基本信息</td>
                            <td class="success">进程</td>
                            <td class="success">邀约主管</td>
                            <td class="success">邀约结果</td>
                            <td class="success">分配时间</td>
                            <td class="success">
                                操作
                            </td>
                        </tr>
                        @foreach($datas as $data)
                            <tr>
                                <td class="active">{{$data->id}}</td>
                                <td class="active">{{$data->name}}</td>
                                <td class="active">
                                    <select name="" id="" class="form-control">
                                        <option value="">手机:{{$data->phone}}</option>
                                        <option value="">备机:{{$data->phone2}}</option>
                                        <option value="">QQ:{{$data->qq}}</option>
                                        <option value="">微信:{{$data->wechat}}</option>
                                        <option value="">预算:{{$data->budget}}</option>
                                        <option value="">录入人:{{$data->users_id}}</option>
                                        <option value="">进程:{{$data->process_id}}</option>
                                        <option value="">创建时间:{{$data->created_at}}</option>
                                    </select>
                                </td>
                                <td class="active">{{$data->process_id}}</td>
                                <td class="active">{{$data->yyzg_id}}</td>
                                <td class="active">{{$data->invite_status}}</td>
                                <td class="active">{{date('y-m-d',$data->yyzg_time)}}</td>
                                <td class="active">
                                    <a class="btn btn-info" href="{{url('resource/remark')}}/{{$data->id}}">显示详情</a>
                                    <a class="btn btn-primary" href="{{url('resource/remark/'.$url)}}/{{$data->id}}">操作</a>
                                </td>
                            </tr>
                        @endforeach
                    </table>
                </div>
            </div>
        </div>

    </div>
@endsection
